home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 27.zip / BS1 part 27 / Panorama3_d1.adf / ARexxMacros / RivLakePts.rexx < prev   
OS/2 REXX Batch file  |  1993-01-17  |  842b  |  34 lines

  1. /* Find the labels of the points along a river starting at the spring
  2.      whose number is entered on the command line.  The river is continued
  3.      through any downstream lakes as long as these have outlets. */
  4.  
  5. OPTIONS RESULTS
  6. arg nspr
  7. address 'Panorama'
  8. 'GetSpringPos' nspr
  9. if rc = 0 then say 'Spring' nspr 'at' RESULT
  10. if rc = 0 then newpt = RESULT
  11. oldpt = 'start'
  12. say 'Downstream points are:'
  13. do while rc=0 & oldpt~=newpt
  14.   oldpt = newpt
  15.   'NextRivPt' oldpt
  16.   if rc = 0 then newpt = RESULT
  17.     else exit
  18.   say newpt
  19.   laken=0
  20.   'GetLakeAt' newpt
  21.   if rc=0 then laken = ABS(RESULT)
  22.     else say 'No lake number found'
  23.   if laken>0 then
  24.     do
  25.       say 'Lake' laken
  26.       'GetLakeOutlet' laken
  27.       if rc = 0 then newpt = RESULT
  28.         else exit
  29.       say 'Restart river at' newpt
  30.     end
  31.   else if laken<0 then
  32.     say 'Lake' laken
  33. end
  34.